<template>
  <div class="tabBox">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane v-if="this.menuList.includes('crisisRosterList')" label="危机管理" name="crisisList">
        <crisis-list></crisis-list>
      </el-tab-pane>
      <el-tab-pane v-if="this.menuList.includes('scheme')" label="危机处理方案" name="dealWith">
        <deal-with></deal-with>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import dealWith from './components/dealWith/index.vue'
import crisisList from './components/crisisList/index.vue'
export default {
  components: {
    dealWith,
    crisisList
  },
  data () {
    return {
      activeName: 'crisisList',
      activeList: ['crisisList', 'dealWith'],
      menuList: []
    }
  },
  created () {
    this.menuList = sessionStorage.getItem('list')
  },
  methods: {
    handleClick () {
      this.$cookies.set('activeName', this.activeName)
    }
  }
}
</script>
